package lxh.palallaxwelcomeview;

import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import lxh.palallaxwelcomeview.parallax.ParallaxViewPager;

public class MainActivity extends AppCompatActivity {
    private ParallaxViewPager mViewPager;
    private int []layoutId={R.layout.fragment_page_first,R.layout.fragment_page_second,R.layout.fragment_page_third};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mViewPager= (ParallaxViewPager) findViewById(R.id.viewPager);
        FragmentManager fm = getSupportFragmentManager();
        mViewPager.setLayout(fm,layoutId);
    }
}
